<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>03_flex布局子项常见属性_03</title>
</head>
<style>
    /* flex属性,定义子项目分配剩余空间,用flex来表示占多少份数 */
    /* flex: <number>; */
    /* flex: default / 0; */
    /* flex: 1; */
    section {
        display: flex;
        width: 60%;
        height: 150px;
        background-color: pink;
        margin: 0 auto;
    }

    div:nth-child(1) {
        width: 100px;
        height: 150px;
        background-color: red;
    }

    div:nth-child(2) {
        flex: 1;
        background-color: aquamarine;
    }

    div:nth-child(3) {
        width: 100px;
        height: 150px;
        background-color: red;
    }

    p {
        display: flex;
        width: 60%;
        height: 150px;
        background-color: pink;
        margin: 100px auto;
    }

    p span {
        flex: 1;
    }

    p span:nth-child(n+2) {
        flex: 2;
        display: flex;
        flex-flow: column wrap;
    }
</style>

<body>
    <section>
        <div></div>
        <div></div>
        <div></div>
    </section>

    <p>
        <span>1</span>
        <span>2
            <span>4</span><span>5</span>
        </span>
        <span>3
            <span>6</span><span>7</span>
        </span>
    </p>


</body>

</html>